/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hanze.FlitsNieuws.network;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

/**
 * Helper klasse, controleert of er verbinding is met internet.
 * 
 * @author alex
 */
public class NetworkHelper {
    
    public static boolean isNetworkAvailable(Context context){
        ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo networkInfo = conMan.getActiveNetworkInfo();       
        
        return networkInfo != null && networkInfo.isConnected();
    }
    
}
